<template>
  <div class="v-module-roomInformation">
    <div class="basic-form">
      <el-form ref="form" class="form-wrap" size="small" :model="form">
        <el-form-item
          :label="item.label"
          prop="a"
          v-for="(item, index) in database"
          :key="index"
        >
          {{ item.value }}
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import { extractName } from '@/utils/extract';

export default {
  props: {
    // 列表数据
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  computed: {
    database() {
      let usevalue = extractName('use_type', this.formData.useType);
      let roomState = extractName('room_state', this.formData.roomState);
      const arr = [
        { label: '隔离点名称', value: this.formData.hotelName },
        { label: '所属区划', value: this.formData.hotelStreet },
        { label: '房间所属楼层', value: this.formData.roomFloor },
        { label: '房间号', value: this.formData.roomNum },
        { label: '使用类型', value: usevalue },
        { label: '使用状态', value: roomState },
        { label: '使用开始时间', value: this.formData.creatime },
        { label: '使用终止时间', value: this.formData.useEndTime },
        { label: '备注', value: this.formData.remark },
      ];
      return arr;
    },
  },
  data() {
    return {
      form: {},
    };
  },
};
</script>

<style lang="scss" scoped>
.v-module-roomInformation {
}
</style>
